import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import VueRouter from 'vue-router'
import E from 'wangeditor'
import 'ant-design-vue/dist/antd.css'
import
{
  Button,
  Layout,
  Icon,
  Menu,
  Switch,
  Breadcrumb,
  Table,
  LocaleProvider,
  Tag,
  Tooltip,
  Pagination,
  Form,
  FormModel,
  Card,
  Input,
  Upload,
  InputNumber,
  message,
  Modal,
  Popconfirm,
  Radio,
  Dropdown,
  Avatar,
  Row,
  Col
} from 'ant-design-vue'
Vue.use(Button)
  .use(Col)
  .use(Row)
  .use(Layout)
  .use(Icon)
  .use(Menu)
  .use(Switch)
  .use(Breadcrumb)
  .use(Table)
  .use(LocaleProvider)
  .use(Tag)
  .use(Tooltip)
  .use(Pagination)
  .use(Form)
  .use(FormModel)
  .use(Card)
  .use(Input)
  .use(Upload)
  .use(InputNumber)
  .use(Modal)
  .use(Popconfirm)
  .use(Radio)
  .use(Dropdown)
  .use(Avatar)

// 【添加代码】解决vue-router在3.0版本以上重复点路由报错
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}
Vue.prototype.$E = E
Vue.prototype.$confirm = Modal.confirm
Vue.prototype.$message = message
Vue.config.productionTip = false
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
